import { createRouter,createWebHashHistory } from "vue-router";

export const contantRoutes = [
    {
        path: '/',
        name: "首页",
        meta: {hidden: true},
        redirect: '/home',
        component: ()=> import("../layout/index.vue"),
        children: [
            {path: 'home', name: "home",component: ()=> import("../views/index.vue"),meta: {hidden: false,title: "首页"}},
            {path: 'file', name: "file", component: ()=> import("../views/file.vue"),meta: {hidden: false,title: "文件上传"}},
            {path: 'echarts', name: "echarts", component: ()=> import("../views/echarts.vue"),meta: {hidden: false,title: "echarts图表"}},
            {path: 'bigscreen', name: "bigscreen", component: ()=> import("../views/bigscreen.vue"),meta: {hidden: false,title: "可视化大屏"}}
        ]
    },
    {path: '/login', name: "登录页",component: ()=> import("../views/login.vue"),meta: {hidden: true}}
]

const router = createRouter({
    routes: [...contantRoutes],
    history: createWebHashHistory()
})

export default router
